home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-08-16 | 57.5 KB | 2,273 lines |
- *** 1.7 1993/06/25 21:14:36
- --- changes 1993/08/16 23:11:16
- ***************
- *** 1,6 ****
- --- 1,56 ----
- Changes are listed in *reverse* order, most recent changes being
- first.
-
- + version 1.09
- +
- + biosfs.c:
- + Implement file locking for BIOS devices.
- + dosmem.c:
- + Fix the Pexec(200,...) bug (trying to save the command line
- + image must be done *before* the existing program's memory
- + is freed).
- + nalloc2.c,util.c:
- + Allow kmalloc()'d memory to be returned to the OS, if possible.
- + xbios.c:
- + Dosound() can be called with a negative number as its parameter,
- + in which case it is only an inquiry function.
- +
- + version 1.08
- +
- + dosfile.c,dosdir.c,filesys.c:
- + Made the file and directory operations re-entrant, by replacing
- + the global variable "temp1" with local variables (where needed).
- + dosdir.c,filesys.c: ++schwab@ls5.informatik.uni-dortmund.de
- + Cleaned up the directory closing functions.
- + dosmem.c: ++schwab@ls5.informatik.uni-dortmund.de
- + Fixed a bug in do_vfork (the child's PROC structure could be
- + freed when signals are checked for, and the old code wasn't
- + prepared for that).
- + purec\*.*: ++reschke@math.uni-muenster.de
- + Updated for the new version of MiNT.
- + *.*: ++alex@falcon.demon.co.uk
- + Lots of fixes to get rid of warnings and some small optimizations.
- + dosmem.c,procfs.c: ++reschke@math.uni-muenster.de
- + In Pexec, save the name and arguments a process was started with
- + into the PROC structure, so that they can be recovered at run time.
- + filesys.c,main.c,unifs.c: ++Ulrich Kuehn
- + At boot time, load files called *.xdd which contain external
- + device drivers.
- + Also, provide Dcntl calls for drive U: to allow installing and
- + de-installing file systems at run time.
- + bios.c: ++nox@jelal.north.de
- + Only busy-wait for the parallel port, not for serial ports.
- + unifs.c: ++schwab@ls5.informatik.uni-dortmund.de
- + Pass Dcntl commands along to file systems.
- + signal.c: ++schwab@ls5.informatik.uni-dortmund.de
- + Make Fselect interruptable.
- + procfs.c: ++schwab@ls5.informatik.uni-dortmund.de
- + Check for illegal signal numbers in ioctl(PTRACEGO,...).
- + dosdir.c:
- + Fattrib should have been following links.
- + *.spp: ++Claus Brod and Uwe Seimet
- + Various optimizations
- +
- version 1.07
-
- debug.c: ++reschke@math.uni-muenster.de
- *** 1.7 1993/06/25 21:14:36
- --- makefile.lcc 1993/08/10 20:49:24
- ***************
- *** 42,47 ****
- --- 42,48 ----
- DEFS030 = -DONLY030 -DDEBUG_INFO
-
- SYMS = -Hmint.sym
- + SYMS030 = -Hmint030.sym
-
- # 30 - pointers do not point to same type of object
- # 86 - formal definitions conflict with type list
- ***************
- *** 52,64 ****
- # 159 - use of unary minus on unsigned value
- ERRORS = -j30e86e100e104e135i154e159i
-
- ! OPTS = -d1 -Oloop -v -cfsb -cag
- ASOPTS = -ma -m8 -d -.
- COPTS = $(OPTS) $(MODEL) $(ERRORS) $(DEFS)
- CFLAGS = $(COPTS) $(SYMS)
- ASFLAGS = $(ASOPTS) $(DEFS)
- COPTS030 = $(OPTS) $(MODEL030) $(ERRORS) $(DEFS030)
- ! CFLAGS030 = $(COPTS030) $(SYMS)
- ASFLAGS030 = -m3 $(ASOPTS) $(DEFS030)
-
- LDFLAGS = -t=
- --- 53,65 ----
- # 159 - use of unary minus on unsigned value
- ERRORS = -j30e86e100e104e135i154e159i
-
- ! OPTS = -d1 -Oloop -v -cfsb -cag -e
- ASOPTS = -ma -m8 -d -.
- COPTS = $(OPTS) $(MODEL) $(ERRORS) $(DEFS)
- CFLAGS = $(COPTS) $(SYMS)
- ASFLAGS = $(ASOPTS) $(DEFS)
- COPTS030 = $(OPTS) $(MODEL030) $(ERRORS) $(DEFS030)
- ! CFLAGS030 = $(COPTS030) $(SYMS030)
- ASFLAGS030 = -m3 $(ASOPTS) $(DEFS030)
-
- LDFLAGS = -t=
- ***************
- *** 66,72 ****
- COBJS = main.o bios.o xbios.o console.o dos.o dosdir.o dosfile.o dosmem.o \
- dossig.o filesys.o mem.o proc.o signal.o timeout.o tty.o util.o \
- biosfs.o pipefs.o procfs.o tosfs.o debug.o rendez.o \
- ! unifs.o shmfs.o fasttext.o welcome.o nalloc2.o memprot.o0 realloc.o
-
- COBJS030 = main.o0 bios.o0 xbios.o0 console.o0 dos.o0 dosdir.o0 dosfile.o0 dosmem.o0 \
- dossig.o0 filesys.o0 mem.o0 proc.o0 signal.o0 timeout.o0 tty.o0 util.o0 \
- --- 67,73 ----
- COBJS = main.o bios.o xbios.o console.o dos.o dosdir.o dosfile.o dosmem.o \
- dossig.o filesys.o mem.o proc.o signal.o timeout.o tty.o util.o \
- biosfs.o pipefs.o procfs.o tosfs.o debug.o rendez.o \
- ! unifs.o shmfs.o fasttext.o welcome.o nalloc2.o memprot.o realloc.o
-
- COBJS030 = main.o0 bios.o0 xbios.o0 console.o0 dos.o0 dosdir.o0 dosfile.o0 dosmem.o0 \
- dossig.o0 filesys.o0 mem.o0 proc.o0 signal.o0 timeout.o0 tty.o0 util.o0 \
- ***************
- *** 87,107 ****
- all: mint.prg mint030.prg
-
- mint.prg: $(OBJS)
- ! $(CC) $(CFLAGS) -o mint.prg $(LDFLAGS) $(OBJS) $(LIBS)
-
- mint030.prg: $(OBJS030)
- ! $(CC) $(CFLAGS030) -o mint030.prg $(LDFLAGS) $(OBJS030) $(LIBS)
-
- $(SOBJS) $(SOBJS030): proc.h
- ! $(COBJS) $(COBJS030): mint.sym
-
- main.o: version.h
- welcome.o: version.h
- bios.o: inline.h
-
- ! mint.sym: mint.h ctype.h assert.h atarierr.h basepage.h types.h \
- signal.h mem.h proc.h file.h sproto.h proto.h inline.h
- ! $(CC) $(COPTS) -ph -o mint.sym mint.h
-
- #
- # assembler source files are now handled in a radically different
- --- 88,121 ----
- all: mint.prg mint030.prg
-
- mint.prg: $(OBJS)
- ! $(CC) $(CFLAGS) -omint.prg $(LDFLAGS) $(OBJS) $(LIBS)
-
- mint030.prg: $(OBJS030)
- ! $(CC) $(CFLAGS030) -omint030.prg $(LDFLAGS) $(OBJS030) $(LIBS)
-
- $(SOBJS) $(SOBJS030): proc.h
- ! $(COBJS): mint.sym
- ! $(COBJS030): mint030.sym
-
- main.o: version.h
- welcome.o: version.h
- bios.o: inline.h
-
- ! memprot.o: memprot.c
- ! $(CC) -c $(CFLAGS) -m3 -omemprot.o memprot.c
- !
- ! main.o0: version.h
- ! welcome.o0: version.h
- ! bios.o0: inline.h
- !
- ! mint.sym mint030.sym: mint.h ctype.h assert.h atarierr.h basepage.h types.h \
- signal.h mem.h proc.h file.h sproto.h proto.h inline.h
- !
- ! mint.sym:
- ! $(CC) $(COPTS) -ph -omint.sym mint.h
- !
- ! mint030.sym:
- ! $(CC) $(COPTS030) -ph -omint030.sym mint.h
-
- #
- # assembler source files are now handled in a radically different
- ***************
- *** 184,202 ****
- .c.o0:
- $(CC) -c $(CFLAGS030) -o$@ $<
-
- ! context.o: context.spp magic.i $(ATRANS)
- ! intr.o: intr.spp magic.i $(ATRANS)
- ! syscall.o: syscall.spp magic.i $(ATRANS)
- ! quickzer.o: quickzer.spp $(ATRANS)
- ! quickmov.o: quickmov.spp $(ATRANS)
- ! cpu.o: cpu.spp $(ATRANS)
- !
- ! context.o0: context.spp magic.i $(ATRANS)
- ! intr.o0: intr.spp magic.i $(ATRANS)
- ! syscall.o0: syscall.spp magic.i $(ATRANS)
- ! quickzer.o0: quickzer.spp $(ATRANS)
- ! quickmov.o0: quickmov.spp $(ATRANS)
- ! cpu.o0: cpu.spp $(ATRANS)
-
- #
- # mkptypes generates prototypes from C source code. If you don't have it,
- --- 198,209 ----
- .c.o0:
- $(CC) -c $(CFLAGS030) -o$@ $<
-
- ! context.o context.o0: context.spp magic.i $(ATRANS)
- ! intr.o intr.o0: intr.spp magic.i $(ATRANS)
- ! syscall.o syscall.o0: syscall.spp magic.i $(ATRANS)
- ! quickzer.o quickzer.o0: quickzer.spp $(ATRANS)
- ! quickmov.o quickmov.o0: quickmov.spp $(ATRANS)
- ! cpu.o cpu.o0: cpu.spp $(ATRANS)
-
- #
- # mkptypes generates prototypes from C source code. If you don't have it,
- ***************
- *** 217,223 ****
- #
- GENFILES= $(OBJS) $(OBJS030) $(ATRANSOBJ) $(ATRANS) $(GENMAGICPRG) \
- $(YTABC) $(YTABH) magic.i __asm.o genmagic.o
- ! EXTRAS= asmtab.c asmtab.h mint.prg mint030.prg mint.sym
-
- clean:
- $(RM) -f $(GENFILES)
- --- 224,230 ----
- #
- GENFILES= $(OBJS) $(OBJS030) $(ATRANSOBJ) $(ATRANS) $(GENMAGICPRG) \
- $(YTABC) $(YTABH) magic.i __asm.o genmagic.o
- ! EXTRAS= asmtab.c asmtab.h mint.prg mint030.prg mint.sym mint030.sym
-
- clean:
- $(RM) -f $(GENFILES)
- *** 1.7 1993/06/25 21:14:36
- --- bios.c 1993/08/10 20:47:18
- ***************
- *** 253,267 ****
- statdev = dev;
- }
-
- ! /* provide a 10 second time out */
- if (!BCOSTAT(statdev)) {
- ! endtime = curtime + 10*200L;
- ! do {
- #if 0
- ! yield();
- #endif
- ! } while (!BCOSTAT(statdev) && curtime < endtime);
- ! if ( curtime >= endtime) return 0;
- }
-
- /* special case: many text accelerators return a bad value from
- --- 253,279 ----
- statdev = dev;
- }
-
- ! /* provide a 10 second time out for the printer */
- if (!BCOSTAT(statdev)) {
- ! if (dev != PRNDEV) {
- ! do {
- ! /* BUG: Speedo GDOS isn't re-entrant; so printer output to the
- ! * serial port could cause problems
- ! */
- ! yield();
- ! } while (!BCOSTAT(statdev));
- ! } else {
- ! endtime = curtime + 10*200L;
- ! do {
- #if 0
- ! /* Speedo GDOS isn't re-entrant, so we can't give up CPU
- ! * time here :-(
- ! */
- ! yield();
- #endif
- ! } while (!BCOSTAT(statdev) && curtime < endtime);
- ! if ( curtime >= endtime) return 0;
- ! }
- }
-
- /* special case: many text accelerators return a bad value from
- *** 1.7 1993/06/25 21:14:36
- --- biosfs.c 1993/08/16 23:10:54
- ***************
- *** 1,5 ****
- /*
- ! Copyright 1991,1992 Eric R. Smith. All rights reserved.
- */
-
- /* simple biosfs.c */
- --- 1,7 ----
- /*
- ! Copyright 1991,1992 Eric R. Smith.
- ! Copyright 1993 Atari Corporation.
- ! All rights reserved.
- */
-
- /* simple biosfs.c */
- ***************
- *** 39,44 ****
- --- 41,47 ----
- static long ARGS_ON_STACK bios_select P_((FILEPTR *f, long p, int mode));
- static void ARGS_ON_STACK bios_unselect P_((FILEPTR *f, long p, int mode));
- static long ARGS_ON_STACK bios_tseek P_((FILEPTR *f, long where, int whence));
- + static long ARGS_ON_STACK bios_close P_((FILEPTR *f, int pid));
-
- long ARGS_ON_STACK null_open P_((FILEPTR *f));
- long ARGS_ON_STACK null_write P_((FILEPTR *f, const char *buf, long bytes));
- ***************
- *** 61,67 ****
-
- DEVDRV bios_tdevice = {
- bios_topen, bios_twrite, bios_tread, bios_tseek, bios_ioctl,
- ! null_datime, null_close, bios_select, bios_unselect
- };
-
- /* device driver for BIOS devices that are not terminals */
- --- 64,70 ----
-
- DEVDRV bios_tdevice = {
- bios_topen, bios_twrite, bios_tread, bios_tseek, bios_ioctl,
- ! null_datime, bios_close, bios_select, bios_unselect
- };
-
- /* device driver for BIOS devices that are not terminals */
- ***************
- *** 68,74 ****
-
- DEVDRV bios_ndevice = {
- null_open, bios_nwrite, bios_nread, null_lseek, bios_ioctl,
- ! null_datime, null_close, bios_select, bios_unselect
- };
-
- DEVDRV null_device = {
- --- 71,77 ----
-
- DEVDRV bios_ndevice = {
- null_open, bios_nwrite, bios_nread, null_lseek, bios_ioctl,
- ! null_datime, bios_close, bios_select, bios_unselect
- };
-
- DEVDRV null_device = {
- ***************
- *** 115,120 ****
- --- 118,124 ----
- ushort flags; /* flags for device open */
- struct tty *tty; /* tty structure (if appropriate) */
- struct bios_file *next;
- + short lockpid; /* owner of the lock */
- };
-
- struct bios_file BDEV[] = {
- ***************
- *** 1022,1027 ****
- --- 1026,1032 ----
- char *aline;
- short dev;
- int i;
- + struct bios_file *b;
-
- if (mode == FIONREAD) {
- if (bconstat(f->fc.aux))
- ***************
- *** 1162,1169 ****
- } else {
- return EINVFN;
- }
- ! } else if ((mode >= TCURSOFF && mode <= TCURSGRATE) && (f->fc.aux == 2)) {
- ! return Cursconf(mode - TCURSOFF, *((short *)buf));
- } else {
- /* Fcntl will automatically call tty_ioctl to handle
- * terminal calls that we didn't deal with
- --- 1167,1218 ----
- } else {
- return EINVFN;
- }
- ! } else if ((mode >= TCURSOFF && mode <= TCURSSTEADY) && (f->fc.aux == 2)) {
- ! return Cursconf(mode - TCURSOFF, 0);
- ! } else if ((mode >= TCURSSRATE && mode <= TCURSGRATE) && (f->fc.aux == 2)) {
- ! long r;
- !
- ! r = Cursconf(mode - TCURSOFF, *((short *)buf));
- ! if (r >= 0) {
- ! *(short *)buf = r;
- ! r = 0;
- ! }
- ! return r;
- ! } else if (mode == F_SETLK || mode == F_SETLKW) {
- ! struct flock *lck = (struct flock *)buf;
- !
- ! b = (struct bios_file *)f->fc.index;
- ! while (b->lockpid && b->lockpid != curproc->pid) {
- ! if (mode == F_SETLKW && lck->l_type != F_UNLCK)
- ! sleep(IO_Q, (long)b);
- ! else
- ! return ELOCKED;
- ! }
- ! if (lck->l_type == F_UNLCK) {
- ! if (!(f->flags & O_LOCK)) {
- ! DEBUG(("bios_ioctl: wrong file descriptor for UNLCK"));
- ! return ENSLOCK;
- ! }
- ! if (b->lockpid != curproc->pid)
- ! return ENSLOCK;
- ! b->lockpid = 0;
- ! f->flags &= ~O_LOCK;
- ! wake(IO_Q, (long)b); /* wake anyone waiting for this lock */
- ! } else {
- ! b->lockpid = curproc->pid;
- ! f->flags |= O_LOCK;
- ! }
- ! } else if (mode == F_GETLK) {
- ! struct flock *lck = (struct flock *)buf;
- !
- ! b = (struct bios_file *)f->fc.index;
- ! if (b->lockpid) {
- ! lck->l_type = F_WRLCK;
- ! lck->l_start = lck->l_len = 0;
- ! lck->l_pid = b->lockpid;
- ! } else {
- ! lck->l_type = F_UNLCK;
- ! }
- } else {
- /* Fcntl will automatically call tty_ioctl to handle
- * terminal calls that we didn't deal with
- ***************
- *** 1220,1225 ****
- --- 1269,1288 ----
- else if (mode == O_WRONLY && tty->wsel == p)
- tty->wsel = 0;
- }
- + }
- +
- + static long ARGS_ON_STACK
- + bios_close(f, pid)
- + FILEPTR *f;
- + int pid;
- + {
- + struct bios_file *b;
- +
- + b = (struct bios_file *)f->fc.index;
- + if ((f->flags & O_LOCK) && (b->lockpid == pid)) {
- + b->lockpid = 0;
- + }
- + return 0;
- }
-
- /*
- *** 1.7 1993/06/25 21:14:36
- --- debug.c 1993/08/13 18:41:26
- ***************
- *** 517,523 ****
- }
-
-
- ! static char *rebootmsg[MAXLANG] = {
- "FATAL ERROR. You must reboot the system.\r\n",
- "FATALER FEHLER. Das System muß neu gestartet werden.\r\n", /* German */
- "FATAL ERROR. You must reboot the system.\r\n", /* French */
- --- 517,523 ----
- }
-
-
- ! static const char *rebootmsg[MAXLANG] = {
- "FATAL ERROR. You must reboot the system.\r\n",
- "FATALER FEHLER. Das System muß neu gestartet werden.\r\n", /* German */
- "FATAL ERROR. You must reboot the system.\r\n", /* French */
- ***************
- *** 608,616 ****
- out_device = 2;
- break;
- case 0x3f: /* F5: dump memory */
- ! DUMPMEM(ker);
- ! DUMPMEM(core);
- ! DUMPMEM(alt);
- break;
- case 0x40: /* F6: dump processes */
- DUMPPROC();
- --- 608,617 ----
- out_device = 2;
- break;
- case 0x3f: /* F5: dump memory */
- ! DUMP_ALL_MEM();
- ! break;
- ! case 0x58: /* shift+F5: dump kernel allocated memory */
- ! NALLOC_DUMP();
- break;
- case 0x40: /* F6: dump processes */
- DUMPPROC();
- *** 1.7 1993/06/25 21:14:36
- --- dosdir.c 1993/08/10 20:48:14
- ***************
- *** 99,110 ****
- return (*dir->fs->dfree)(dir, buf);
- }
-
- - /* temp1 is a convenient place for path2fs puts the last component of
- - * the path name
- - */
- -
- - extern char temp1[PATH_MAX]; /* in filesys.c */
- -
- long ARGS_ON_STACK
- d_create(path)
- const char *path;
- --- 99,104 ----
- ***************
- *** 111,116 ****
- --- 105,111 ----
- {
- fcookie dir;
- long r;
- + char temp1[PATH_MAX];
-
- TRACE(("Dcreate(%s)", path));
-
- ***************
- *** 140,145 ****
- --- 135,141 ----
- PROC *p;
- int i;
- XATTR xattr;
- + char temp1[PATH_MAX];
-
- TRACE(("Ddelete(%s)", path));
-
- ***************
- *** 365,370 ****
- --- 361,367 ----
- XATTR xattr;
- long r;
- int i, havelabel;
- + char temp1[PATH_MAX];
-
- TRACE(("Fsfirst(%s, %x)", path, attrib));
-
- ***************
- *** 567,573 ****
- long ARGS_ON_STACK
- f_snext()
- {
- ! static char buf[TOS_NAMELEN+1];
- DTABUF *dta = curproc->dta;
- FILESYS *fs;
- fcookie fc;
- --- 564,570 ----
- long ARGS_ON_STACK
- f_snext()
- {
- ! char buf[TOS_NAMELEN+1];
- DTABUF *dta = curproc->dta;
- FILESYS *fs;
- fcookie fc;
- ***************
- *** 684,690 ****
-
- TRACE(("Fattrib(%s, %d)", name, attr));
-
- ! r = path2cookie(name, (char *)0, &fc);
-
- if (r) {
- DEBUG(("Fattrib(%s): error %ld", name, r));
- --- 681,687 ----
-
- TRACE(("Fattrib(%s, %d)", name, attr));
-
- ! r = path2cookie(name, follow_links, &fc);
-
- if (r) {
- DEBUG(("Fattrib(%s): error %ld", name, r));
- ***************
- *** 727,732 ****
- --- 724,730 ----
- {
- fcookie dir;
- long r;
- + char temp1[PATH_MAX];
-
- TRACE(("Fdelete(%s)", name));
-
- ***************
- *** 756,762 ****
- {
- fcookie olddir, newdir, oldfil;
- XATTR xattr;
- ! char temp2[PATH_MAX];
- long r;
-
- UNUSED(junk);
- --- 754,760 ----
- {
- fcookie olddir, newdir, oldfil;
- XATTR xattr;
- ! char temp1[PATH_MAX], temp2[PATH_MAX];
- long r;
-
- UNUSED(junk);
- ***************
- *** 954,961 ****
- DIR *dirh = (DIR *)handle;
- DIR **where;
-
- - if (!dirh->fc.fs)
- - return EIHNDL;
- where = &curproc->searches;
- while (*where && *where != dirh) {
- where = &((*where)->next);
- --- 952,957 ----
- ***************
- *** 968,976 ****
- /* unlink the directory from the chain */
- *where = dirh->next;
-
- ! r = (*dirh->fc.fs->closedir)(dirh);
- ! release_cookie(&dirh->fc);
- ! dirh->fc.fs = 0;
-
- if (r) {
- DEBUG(("Dclosedir: error %ld", r));
- --- 964,975 ----
- /* unlink the directory from the chain */
- *where = dirh->next;
-
- ! if (dirh->fc.fs) {
- ! r = (*dirh->fc.fs->closedir)(dirh);
- ! release_cookie(&dirh->fc);
- ! } else {
- ! r = 0;
- ! }
-
- if (r) {
- DEBUG(("Dclosedir: error %ld", r));
- ***************
- *** 1019,1025 ****
- const char *old, *new;
- {
- fcookie olddir, newdir;
- ! char temp2[PATH_MAX];
- long r;
-
- TRACE(("Flink(%s, %s)", old, new));
- --- 1018,1024 ----
- const char *old, *new;
- {
- fcookie olddir, newdir;
- ! char temp1[PATH_MAX], temp2[PATH_MAX];
- long r;
-
- TRACE(("Flink(%s, %s)", old, new));
- ***************
- *** 1066,1071 ****
- --- 1065,1071 ----
- {
- fcookie newdir;
- long r;
- + char temp1[PATH_MAX];
-
- TRACE(("Fsymlink(%s, %s)", old, new));
-
- ***************
- *** 1131,1136 ****
- --- 1131,1137 ----
- {
- fcookie dir;
- long r;
- + char temp1[PATH_MAX];
-
- TRACE(("Dcntl(cmd=%x, file=%s, arg=%lx)", cmd, name, arg));
-
- *** 1.7 1993/06/25 21:14:36
- --- dosfile.c 1993/08/10 20:48:20
- ***************
- *** 8,15 ****
-
- #include "mint.h"
-
- - extern char temp1[]; /* see filesys.c */
- -
- static long do_dup P_((int,int));
- static void unselectme P_((PROC *));
-
- --- 8,13 ----
- ***************
- *** 33,38 ****
- --- 31,37 ----
- XATTR xattr;
- unsigned perm;
- int creating;
- + char temp1[PATH_MAX];
- extern FILESYS proc_filesys;
-
- /* for special BIOS "fake" devices */
- ***************
- *** 381,386 ****
- --- 380,386 ----
- long r;
- PROC *proc;
- int offset = 0;
- + char temp1[PATH_MAX];
-
- TRACE(("Fcreate(%s, %x)", name, attrib));
- #if O_GLOBAL
- *** 1.7 1993/06/25 21:14:36
- --- dosmem.c 1993/08/16 18:28:26
- ***************
- *** 13,18 ****
- --- 13,20 ----
-
- #include "mint.h"
-
- + #define DIRSEP(c) ((c) == '\\')
- +
- int procdate, proctime; /* set when any processes are created/destroyed */
-
- static long do_vfork P_((int));
- ***************
- *** 313,321 ****
- --- 315,325 ----
- XATTR xattr;
- int newpid;
-
- + #ifdef DEBUG_INFO
- /* tfmt and tail_offs are used for debugging only */
- const char *tfmt = "Pexec(%d,%s,\"%s\",%lx)";
- int tail_offs = 1;
- + #endif
-
- /* the high bit of mode controls process tracing */
- switch(mode & 0x7fff) {
- ***************
- *** 338,345 ****
- --- 342,351 ----
- case 4:
- mkwait = mkgo = 1;
- thread = (mode == 4);
- + #ifdef DEBUG_INFO
- tfmt = "Pexec(%d,%lx,BP:%lx,%lx)";
- tail_offs = 0;
- + #endif
- break;
- case 106:
- mkfree = 1; /* fall through */
- ***************
- *** 347,354 ****
- --- 353,362 ----
- thread = (mode == 104);
- mkgo = 1;
- mkname = (ptr1 != 0);
- + #ifdef DEBUG_INFO
- tfmt = "Pexec(%d,%s,BP:%lx,%lx)";
- tail_offs = 0;
- + #endif
- break;
- case 206:
- #if 0
- ***************
- *** 363,370 ****
- --- 371,380 ----
- case 204:
- mkgo = overlay = 1;
- mkname = (ptr1 != 0);
- + #ifdef DEBUG_INFO
- tfmt = "Pexec(%d,%s,BP:%lx,%lx)";
- tail_offs = 0;
- + #endif
- break;
- case 7:
- flags = (long)ptr1; /* set program flags */
- ***************
- *** 371,378 ****
- --- 381,390 ----
- /* and fall through */
- case 5:
- mkbase = 1;
- + #ifdef DEBUG_INFO
- tfmt = "Pexec(%d,%lx,%s,%lx)";
- tail_offs = 0;
- + #endif
- break;
- default:
- DEBUG(("Pexec(%d,%lx,%lx,%lx): bad mode",mode,ptr1,ptr2,ptr3));
- ***************
- *** 402,408 ****
- TRACE(("creating environment"));
-
- if (mkload || mkbase) {
- ! env = create_env((char *)ptr3);
- if (!env) {
- DEBUG(("Pexec: unable to create environment"));
- if (p) dispose_proc(p);
- --- 414,420 ----
- TRACE(("creating environment"));
-
- if (mkload || mkbase) {
- ! env = create_env((char *)ptr3, flags);
- if (!env) {
- DEBUG(("Pexec: unable to create environment"));
- if (p) dispose_proc(p);
- ***************
- *** 531,536 ****
- --- 543,571 ----
- }
- return mint_errno;
- }
- +
- + /* jr: add Pexec information to PROC struct */
- + strncpy(p->cmdlin, b->p_cmdlin, 128);
- + p->fname[0] = 0;
- + if (mkload) {
- + char tmp[PATH_MAX];
- + char *source = ptr1;
- + tmp[1] = ':';
- + if (source[1] == ':') {
- + tmp[0] = source[0];
- + source += 2;
- + } else
- + tmp[0] = 'A' + curproc->curdrv;
- + if (DIRSEP(source[0])) /* absolute path? */
- + {
- + strncpy (&tmp[2], &source[0], PATH_MAX-2);
- + strcpy (p->fname, tmp);
- + } else {
- + if (! d_getcwd (&tmp[2], tmp[0] - 'A' + 1, PATH_MAX - 2))
- + ksprintf (p->fname, "%s\\%s", tmp, source);
- + }
- + }
- +
- if (ptrace)
- p->ptracer = pid2proc(p->ppid);
-
- ***************
- *** 731,739 ****
-
- /* close pending opendir/readdir searches */
- for (dirh = curproc->searches; dirh; ) {
- ! if (!dirh->fc.fs) continue;
- ! (*dirh->fc.fs->closedir)(dirh);
- ! release_cookie(&dirh->fc);
- nexth = dirh->next;
- kfree(dirh);
- dirh = nexth;
- --- 766,775 ----
-
- /* close pending opendir/readdir searches */
- for (dirh = curproc->searches; dirh; ) {
- ! if (dirh->fc.fs) {
- ! (*dirh->fc.fs->closedir)(dirh);
- ! release_cookie(&dirh->fc);
- ! }
- nexth = dirh->next;
- kfree(dirh);
- dirh = nexth;
- ***************
- *** 1099,1105 ****
- --- 1135,1144 ----
- assert(p != curproc);
-
- /* take the child off both the global and ZOMBIE lists */
- + { short sr = spl7();
- rm_q(ZOMBIE_Q, p);
- + spl(sr);
- + }
-
- if (proclist == p) {
- proclist = p->gl_next;
- ***************
- *** 1174,1180 ****
- long sigmask;
- MEMREGION *m, *savemem = 0;
- long savesize, txtsize;
- ! int i;
- char *saveplace;
-
- p = fork_proc();
- --- 1213,1219 ----
- long sigmask;
- MEMREGION *m, *savemem = 0;
- long savesize, txtsize;
- ! int i, newpid;
- char *saveplace;
-
- p = fork_proc();
- ***************
- *** 1277,1284 ****
- detach_region(curproc, savemem);
- }
- curproc->sigmask = sigmask;
- check_sigs(); /* did we get any signals while sleeping? */
- ! return p->pid;
- }
-
- /*
- --- 1316,1327 ----
- detach_region(curproc, savemem);
- }
- curproc->sigmask = sigmask;
- + /* note that the PROC structure pointed to by p may be freed during
- + * the check_sigs call!
- + */
- + newpid = p->pid;
- check_sigs(); /* did we get any signals while sleeping? */
- ! return newpid;
- }
-
- /*
- *** 1.7 1993/06/25 21:14:36
- --- filesys.c 1993/08/10 20:48:52
- ***************
- *** 121,132 ****
- * processes are run
- *
- * NOTE that a number of directory changes take place here: we look first
- ! * in the current directory, then in the directory \mint, and finally
- ! * the d_lock() calls force us into the root directory.
- */
-
- typedef FILESYS * ARGS_ON_STACK (*FSFUNC) P_((struct kerinfo *));
-
- void
- load_filesys()
- {
- --- 121,138 ----
- * processes are run
- *
- * NOTE that a number of directory changes take place here: we look first
- ! * in the current directory, then in the directory \mint.
- */
-
- typedef FILESYS * ARGS_ON_STACK (*FSFUNC) P_((struct kerinfo *));
-
- + /* uk: made this lie outside of functions, as load_filesys() and
- + * load_devdriver() need access to it.
- + */
- + #define NPATHS 3
- + static const char *ext_paths[NPATHS] = {"", "\\MINT", "\\MULTITOS"};
- +
- +
- void
- load_filesys()
- {
- ***************
- *** 139,157 ****
- extern struct kerinfo kernelinfo; /* in main.c */
- char curpath[PATH_MAX];
- MEMREGION *xfsreg;
- - #define NPATHS 3
- - static const char *paths[NPATHS] = {"", "\\MINT", "\\MULTITOS"};
-
- curproc->dta = &dta;
- d_getpath(curpath,0);
-
- for (i = 0; i < NPATHS; i++) {
- ! if (*paths[i]) {
- /* don't bother checking the current directory twice! */
- ! if (!stricmp(paths[i],curpath))
- r = -1;
- else
- ! r = d_setpath(paths[i]);
- }
- else
- r = 0;
- --- 145,161 ----
- extern struct kerinfo kernelinfo; /* in main.c */
- char curpath[PATH_MAX];
- MEMREGION *xfsreg;
-
- curproc->dta = &dta;
- d_getpath(curpath,0);
-
- for (i = 0; i < NPATHS; i++) {
- ! if (*ext_paths[i]) {
- /* don't bother checking the current directory twice! */
- ! if (!stricmp(ext_paths[i],curpath))
- r = -1;
- else
- ! r = d_setpath(ext_paths[i]);
- }
- else
- r = 0;
- ***************
- *** 177,185 ****
- /* put the loaded XFS into super accesible memory */
- xfsreg = addr2region( (long) b );
- mark_region(xfsreg, PROT_S);
- /* link it into the list of drivers */
- ! fs->next = active_fs;
- ! active_fs = fs;
- } else {
- DEBUG(("%s returned null", dta.dta_name));
- m_free((virtaddr)b);
- --- 181,209 ----
- /* put the loaded XFS into super accesible memory */
- xfsreg = addr2region( (long) b );
- mark_region(xfsreg, PROT_S);
- +
- /* link it into the list of drivers */
- ! /* uk: but only if it has not installed itself via Dcntl()
- ! * after checking if file system is already installed,
- ! * so we know for sure that each file system in at most
- ! * once in the chain (important for removal!)
- ! * also note: this doesn't preclude loading two different
- ! * instances of the same file system driver, e.g. it's perfectly
- ! * OK to have a "cdromy1.xfs" and "cdromz2.xfs"; the check below
- ! * just makes sure that a given instance of a file system is
- ! * installed at most once. I.e., it prevents cdromy1.xfs from being
- ! * installed twice.
- ! */
- ! if ((FILESYS*)1L != fs) {
- ! FILESYS *f = active_fs;
- ! for (; f; f = f->next)
- ! if (f == fs)
- ! break;
- ! if (!f) { /* we ran completly through the list */
- ! fs->next = active_fs;
- ! active_fs = fs;
- ! }
- ! }
- } else {
- DEBUG(("%s returned null", dta.dta_name));
- m_free((virtaddr)b);
- ***************
- *** 201,206 ****
- --- 225,334 ----
- #endif
- }
-
- +
- + /*
- + * uk: load device driver in files called *.xdd (external device driver)
- + * from disk
- + * maybe this should go into biosfs.c ??
- + *
- + * this routine is called after process 0 is set up, but before any user
- + * processes are run, but before the loadable file systems come in,
- + * so they can make use of external device drivers
- + *
- + * NOTE that a number of directory changes take place here: we look first
- + * in the current directory, then in the directory \mint, and finally
- + * the d_lock() calls force us into the root directory.
- + * ??? what d_lock() calls ???
- + */
- +
- + typedef DEVDRV * ARGS_ON_STACK (*DEVFUNC) P_((struct kerinfo *));
- +
- + #define DEV_SELFINST ((DEVDRV*)1L) /* dev driver did dcntl() already */
- +
- + void
- + load_devdriver()
- + {
- + long r;
- + BASEPAGE *b;
- + DEVDRV *dev;
- + DEVFUNC initf;
- + struct dev_descr the_dev;
- + static DTABUF dta;
- + int i;
- + extern struct kerinfo kernelinfo; /* in main.c */
- + char curpath[PATH_MAX];
- + char dev_name[PATH_MAX]; /* a bit long, but one never knows... */
- + char ch, *p;
- + MEMREGION *xddreg;
- +
- +
- + curproc->dta = &dta;
- + d_getpath(curpath,0);
- +
- + for (i = 0; i < NPATHS; i++) {
- + if (*ext_paths[i]) {
- + /* don't bother checking the current directory twice! */
- + if (!stricmp(ext_paths[i],curpath))
- + r = -1;
- + else
- + r = d_setpath(ext_paths[i]);
- + }
- + else
- + r = 0;
- +
- + if (r == 0)
- + r = f_sfirst("*.xdd", 0);
- +
- + while (r == 0) {
- + b = (BASEPAGE *)p_exec(3, dta.dta_name, (char *)"", (char *)0);
- + if ( ((long)b) < 0 ) {
- + DEBUG(("Error loading device driver %s", dta.dta_name));
- + r = f_snext();
- + continue;
- + }
- + /* we leave a little bit of slop at the end of the loaded stuff */
- + m_shrink(0, (virtaddr)b, 512 + b->p_tlen + b->p_dlen + b->p_blen);
- + initf = (DEVFUNC)b->p_tbase;
- + TRACE(("initializing %s", dta.dta_name));
- + dev = (*initf)(&kernelinfo);
- +
- + if (dev) {
- + if (DEV_SELFINST != dev) {
- + /* we need to install the device driver ourselves */
- + the_dev.driver = dev;
- + the_dev.dinfo = 0;
- + the_dev.flags = 0;
- + the_dev.tty = (struct tty*)0L;
- + the_dev.reserved[0] = the_dev.reserved[1] = 0;
- + the_dev.reserved[2] = the_dev.reserved[3] = 0;
- + p = dta.dta_name;
- + while (*p && *p != '.') p++;
- + ch = *p;
- + *p = '\0'; /* we dont want the extension */
- + strcpy(dev_name, "u:\\dev\\");
- + strcat(dev_name, dta.dta_name);
- + *p = ch;
- + r = d_cntl(DEV_INSTALL, dev_name, (long)&the_dev);
- + if (r <= 0) {
- + DEBUG(("Error installing device driver %s", dta.dta_name));
- + r = f_snext();
- + continue;
- + }
- + }
- + TRACE(("%s loaded OK", dta.dta_name));
- + /* put the loaded XDD into super accesible memory */
- + xddreg = addr2region( (long) b );
- + mark_region(xddreg, PROT_S);
- + } else {
- + DEBUG(("%s returned null", dta.dta_name));
- + m_free((virtaddr)b);
- + }
- + r = f_snext();
- + }
- + }
- + }
- +
- +
- void
- close_filesys()
- {
- ***************
- *** 285,294 ****
- }
-
- /* terminate any active directory searches on the drive */
- - /* BUG: This handles only Fsfirst/Fsnext searches! */
- for (i = 0; i < NUM_SEARCH; i++) {
- dirh = &p->srchdir[i];
- ! if (dirh->fc.fs && dirh->fc.dev == d) {
- TRACE(("closing search for process %d", p->pid));
- release_cookie(&dirh->fc);
- dirh->fc.fs = 0;
- --- 413,421 ----
- }
-
- /* terminate any active directory searches on the drive */
- for (i = 0; i < NUM_SEARCH; i++) {
- dirh = &p->srchdir[i];
- ! if (p->srchdta[i] && dirh->fc.fs && dirh->fc.dev == d) {
- TRACE(("closing search for process %d", p->pid));
- release_cookie(&dirh->fc);
- dirh->fc.fs = 0;
- ***************
- *** 296,301 ****
- --- 423,438 ----
- }
- }
-
- + for (dirh = p->searches; dirh; dirh = dirh->next) {
- + /* If this search is on the changed drive, release
- + the cookie, but do *not* free it, since the
- + user could later call closedir on it. */
- + if (dirh->fc.fs && dirh->fc.dev == d) {
- + release_cookie (&dirh->fc);
- + dirh->fc.fs = 0;
- + }
- + }
- +
- if (d >= NUM_DRIVES) continue;
-
- /* change any active directories on the device to the (new) root */
- ***************
- *** 400,407 ****
- /*
- * routines for parsing path names
- */
- -
- - char temp1[PATH_MAX]; /* temporary storage for file names */
-
- #define DIRSEP(p) ((p) == '\\')
-
- --- 537,542 ----
- *** 1.7 1993/06/25 21:14:36
- --- main.c 1993/08/10 20:49:14
- ***************
- *** 212,218 ****
- /*C*/ 8, /* CPU32 bus error */
- /*D*/ 0, /* NOTUSED */
- /*E*/ 0, /* NOTUSED */
- ! /*F*/ 0 /* NOTUSED */
- };
-
- /* TOS and MiNT cookie jars, respectively. See the comments and code
- --- 212,218 ----
- /*C*/ 8, /* CPU32 bus error */
- /*D*/ 0, /* NOTUSED */
- /*E*/ 0, /* NOTUSED */
- ! /*F*/ 13 /* 68070 and 9xC1xx microcontroller address error */
- };
-
- /* TOS and MiNT cookie jars, respectively. See the comments and code
- ***************
- *** 265,286 ****
- do_exec_os(basepage)
- register long basepage;
- {
- ! register int r;
-
- ! if (!init_prg)
- ! init_prg = "\\multitos\\gem.sys";
-
- /* we have to set a7 to point to lower in our TPA; otherwise we would
- * bus error right after the Mshrink call!
- */
- ! setstack(basepage+500L);
- #if defined(__TURBOC__) && !defined(__MINT__)
- ! Mshrink(0, (void *)basepage, 512L);
- #else
- ! Mshrink((void *)basepage, 512L);
- #endif
- ! r = (int) Pexec(200, (char *)init_prg, init_tail, init_env);
- ! Pterm(r);
- }
-
-
- --- 265,292 ----
- do_exec_os(basepage)
- register long basepage;
- {
- ! register long r;
-
- ! /* if the user didn't specify a startup program, jump to the ROM */
- ! if (!init_prg) {
- ! register void ARGS_ON_STACK (*f) P_((long));
- ! f = (void ARGS_ON_STACK (*) P_((long))) old_execos.next;
- ! (*f)(basepage);
- ! Pterm0();
- ! } else {
-
- /* we have to set a7 to point to lower in our TPA; otherwise we would
- * bus error right after the Mshrink call!
- */
- ! setstack(basepage+500L);
- #if defined(__TURBOC__) && !defined(__MINT__)
- ! Mshrink(0, (void *)basepage, 512L);
- #else
- ! Mshrink((void *)basepage, 512L);
- #endif
- ! r = Pexec(200, (char *)init_prg, init_tail, init_env);
- ! Pterm((int)r);
- ! }
- }
-
-
- ***************
- *** 816,821 ****
- --- 822,829 ----
- */
- (void)d_setpath(curpath);
-
- + load_devdriver();
- +
- #ifndef PROFILING
- /* load_filesys causes media changes :-( */
- load_filesys();
- ***************
- *** 866,872 ****
- r = p_exec(0, (char *)init_prg, init_tail, init_env);
- } else if (!gem_active) {
- BASEPAGE *bp; int pid;
- ! bp = (BASEPAGE *)p_exec(7, (char *)7L, (char *)"\0", init_env);
- bp->p_tbase = *((long *) EXEC_OS );
- r = p_exec(106, (char *)"GEM", bp, 0L);
- pid = (int)r;
- --- 874,882 ----
- r = p_exec(0, (char *)init_prg, init_tail, init_env);
- } else if (!gem_active) {
- BASEPAGE *bp; int pid;
- ! bp = (BASEPAGE *)p_exec(7,
- ! (char *)((long)F_FASTLOAD | F_ALTLOAD | F_ALTALLOC | F_PROT_S),
- ! (char *)"\0", init_env);
- bp->p_tbase = *((long *) EXEC_OS );
- r = p_exec(106, (char *)"GEM", bp, 0L);
- pid = (int)r;
- ***************
- *** 1039,1045 ****
- if (jar->value != 30) no_mem_prot = 1;
- foundcpu = 1;
- } else if (!strncmp(jar->tag.aschar, "_VDO",4)) {
- ! FalconVideo = (jar->value == 0x00000300L);
- if (jar->value & 0xffff0000L)
- screen_boundary = 15;
- } else if (!strncmp(jar->tag.aschar, "MiNT",4)) {
- --- 1049,1055 ----
- if (jar->value != 30) no_mem_prot = 1;
- foundcpu = 1;
- } else if (!strncmp(jar->tag.aschar, "_VDO",4)) {
- ! FalconVideo = (jar->value == 0x00030000L);
- if (jar->value & 0xffff0000L)
- screen_boundary = 15;
- } else if (!strncmp(jar->tag.aschar, "MiNT",4)) {
- ***************
- *** 1131,1136 ****
- --- 1141,1147 ----
- if (!strcmp(name, "INIT")) {
- init_is_gem = 0;
- setup_init:
- + if (!*val) return;
- t = kmalloc(strlen(val)+1);
- if (!t) return;
- strcpy(t, val);
- *** 1.7 1993/06/25 21:14:36
- --- mem.c 1993/08/13 18:11:30
- ***************
- *** 33,46 ****
- */
-
- /* initial number of memory regions */
- ! #define NREGIONS 512
-
- /* number of new regions to allocate when the initial ones are used up */
- ! #define NEWREGIONS 256
-
- static MEMREGION use_regions[NREGIONS+1];
- MEMREGION *rfreelist;
-
- /* these variables are set in init_core(), and used in
- * init_mem()
- */
- --- 33,51 ----
- */
-
- /* initial number of memory regions */
- ! #define NREGIONS ((8*1024)/sizeof(MEMREGION))
-
- /* number of new regions to allocate when the initial ones are used up */
- ! #define NEWREGIONS ((8*1024)/sizeof(MEMREGION))
-
- static MEMREGION use_regions[NREGIONS+1];
- MEMREGION *rfreelist;
-
- + /* variable for debugging purposes; number of times we've needed
- + * to get new regions
- + */
- + int num_reg_requests = 0;
- +
- /* these variables are set in init_core(), and used in
- * init_mem()
- */
- ***************
- *** 342,347 ****
- --- 347,353 ----
- newstuff = get_region(core, NEWREGIONS*SIZEOF(MEMREGION), PROT_S);
- newfrees = newstuff ? (MEMREGION *)newstuff->loc : 0;
- if (newfrees) {
- + num_reg_requests++;
- newfrees[NEWREGIONS-1].next = 0;
- newfrees[NEWREGIONS-1].links = 0;
- for (i = 0; i < NEWREGIONS-1; i++) {
- ***************
- *** 885,892 ****
- */
-
- MEMREGION *
- ! create_env(env)
- const char *env;
- {
- long size;
- MEMREGION *m;
- --- 891,899 ----
- */
-
- MEMREGION *
- ! create_env(env, flags)
- const char *env;
- + ulong flags;
- {
- long size;
- MEMREGION *m;
- ***************
- *** 893,898 ****
- --- 900,906 ----
- virtaddr v;
- const char *old;
- char *new;
- + short protmode;
-
- if (!env) {
- env = ((BASEPAGE *)curproc->base)->p_env;
- ***************
- *** 903,912 ****
- while (*env || *(env+1))
- env++,size++;
-
- ! v = alloc_region(core, size, PROT_P);
- /* if core fails, try alt */
- if (!v)
- ! v = alloc_region(alt, size, PROT_P);
-
- if (!v) {
- DEBUG(("create_env: alloc_region failed"));
- --- 911,922 ----
- while (*env || *(env+1))
- env++,size++;
-
- ! protmode = (flags & F_PROTMODE) >> F_PROTSHIFT;
- !
- ! v = alloc_region(core, size, protmode);
- /* if core fails, try alt */
- if (!v)
- ! v = alloc_region(alt, size, protmode);
-
- if (!v) {
- DEBUG(("create_env: alloc_region failed"));
- ***************
- *** 1605,1613 ****
- --- 1615,1626 ----
- void
- DUMP_ALL_MEM()
- {
- + #ifdef DEBUG_INFO
- DUMPMEM(ker);
- DUMPMEM(core);
- DUMPMEM(alt);
- + FORCE("new memory region descriptor pages: %d", num_reg_requests);
- + #endif
- }
-
- void
- *** 1.7 1993/06/25 21:14:36
- --- memprot.c 1993/08/10 20:49:44
- ***************
- *** 495,501 ****
- ushort dt_val, s_val, wp_val;
- PROC *proc;
- MEMREGION **mr;
- - int change;
-
- if (no_mem_prot) return;
-
- --- 495,500 ----
- ***************
- *** 505,515 ****
- mode = global_mode_table[(start >> 13)];
- }
-
- - if (global_mode_table[(start >> 13)] == mode) {
- - change = 0;
- - }
- - else change = 1;
- -
- /* mark the global page table */
-
- memset(&global_mode_table[start >> 13],mode,(len >> 13));
- --- 504,509 ----
- ***************
- *** 939,946 ****
- void
- report_buserr()
- {
- ! long_desc *tbl;
- ! const char *vmsg = NULL;
- short mode;
- ulong aa, pc;
- char alertbuf[5*32+16]; /* enough for an alert */
- --- 933,939 ----
- void
- report_buserr()
- {
- ! const char *vmsg;
- short mode;
- ulong aa, pc;
- char alertbuf[5*32+16]; /* enough for an alert */
- ***************
- *** 948,954 ****
-
- if (no_mem_prot) return;
-
- - tbl = (long_desc *)curproc->exception_tbl;
- aa = curproc->exception_addr;
- pc = curproc->exception_pc;
- if ((mint_top_tt && aa < mint_top_tt) || (aa < mint_top_st)) {
- --- 941,946 ----
- ***************
- *** 1031,1037 ****
- MEMREGION *mp, **mr, **map;
- PROC *p;
- ulong loc;
- ! short owner = 0;
- short i;
- short first;
-
- --- 1023,1029 ----
- MEMREGION *mp, **mr, **map;
- PROC *p;
- ulong loc;
- ! short owner;
- short i;
- short first;
-
- *** 1.7 1993/06/25 21:14:36
- --- nalloc2.c 1993/08/13 20:36:48
- ***************
- *** 1,5 ****
- /*
- ! * Copyright 1992 Atari Corporation. All rights reserved.
- */
-
- /*
- --- 1,6 ----
- /*
- ! * Copyright 1992,1993 Atari Corporation.
- ! * All rights reserved.
- */
-
- /*
- ***************
- *** 65,75 ****
- void *start;
- long len;
- {
- ! struct arena *a = start;
- struct block *b;
-
- ! a->a_next = a_first;
- ! a_first = a;
- a->a_ffirst = b = (struct block *)(a+1);
- a->a_size = len;
- b->b_next = NULL;
- --- 66,82 ----
- void *start;
- long len;
- {
- ! struct arena *a;
- struct block *b;
-
- ! for (a = a_first; a && a->a_next; a = a->a_next)
- ! continue;
- ! if (a)
- ! a->a_next = (struct arena *)start;
- ! else
- ! a_first = (struct arena *)start;
- ! a = start;
- ! a->a_next = NULL;
- a->a_ffirst = b = (struct block *)(a+1);
- a->a_size = len;
- b->b_next = NULL;
- ***************
- *** 230,244 ****
- fb->b_next = b->b_next;
- }
-
- - #if 0
- /* if, after coalescing, this arena is entirely free, Mfree it! */
- ! if (a->a_ffirst == a+1 &&
- (a->a_ffirst->b_size + sizeof(struct block)) == a->a_size) {
- NALLOC_DEBUG('!');
- *qa = a->a_next;
- (void)Mfree(a);
- - }
- #endif
-
- return;
- }
- --- 237,253 ----
- fb->b_next = b->b_next;
- }
-
- /* if, after coalescing, this arena is entirely free, Mfree it! */
- ! if ((struct arena *)a->a_ffirst == a+1 &&
- (a->a_ffirst->b_size + sizeof(struct block)) == a->a_size) {
- NALLOC_DEBUG('!');
- *qa = a->a_next;
- + #if 1
- + kfree(a); /* MiNT -- give back so it can be used by users */
- + #else
- (void)Mfree(a);
- #endif
- + }
-
- return;
- }
- *** 1.7 1993/06/25 21:14:36
- --- proc.c 1993/08/13 22:46:50
- ***************
- *** 1,6 ****
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 139,146 ****
- --- 139,151 ----
- dup_cookie(&p->curdir[i], &curproc->curdir[i]);
- }
-
- + /* jr: copy ploadinfo */
- + strcpy (p->cmdlin, curproc->cmdlin);
- + strcpy (p->fname, curproc->fname);
- +
- /* clear directory search info */
- zero((char *)p->srchdta, NUM_SEARCH * SIZEOF(DTABUF *));
- + zero((char *)p->srchdir, SIZEOF(p->srchdir));
- p->searches = 0;
-
- /* copy memory */
- ***************
- *** 454,461 ****
- --- 459,468 ----
- PROC *p;
- short sr;
- extern short kintr; /* in bios.c */
- + #ifndef MULTITOS
- #ifdef FASTTEXT
- extern int hardscroll; /* in fasttext.c */
- + #endif
- #endif
-
- /*
- *** 1.7 1993/06/25 21:14:36
- --- procfs.c 1993/08/13 22:49:58
- ***************
- *** 544,549 ****
- --- 544,550 ----
- * PTRACEFLOW: restart the process (T1=0/T0=1)
- * PTRACESTEP: restart the process (T1=1/T0=0)
- * PTRACE11: restart the process (T1=1/T0=1)
- + * PLOADINFO: get information about the process name and command line
- */
-
- static long ARGS_ON_STACK
- ***************
- *** 552,557 ****
- --- 553,559 ----
- {
- PROC *p;
- extern long mcpu; /* in main.c */
- + short sr;
-
- p = (PROC *)f->devinfo;
- switch(mode) {
- ***************
- *** 633,638 ****
- --- 635,644 ----
- DEBUG(("proc_ioctl(PTRACE): process stopped by job control"));
- return EACCDN;
- }
- + if (buf && *(ushort *)buf >= NSIG) {
- + DEBUG(("proc_ioctl(PTRACE): illegal signal number"));
- + return ERANGE;
- + }
- p->ctxt[SYSCALL].sr &= 0x3fff; /* clear both trace bits */
- p->ctxt[SYSCALL].sr |= (mode - PTRACEGO) << 14;
- p->sigpending = 0;
- ***************
- *** 649,657 ****
- --- 655,679 ----
- TRACE(("PTRACEGO: no signal"));
- }
- /* wake the process up */
- + sr = spl7();
- rm_q(p->wait_q, p);
- add_q(READY_Q, p);
- + spl(sr);
- + return 0;
- + /* jr: PLOADINFO returns information about params passed to Pexec */
- + case PLOADINFO:
- + {
- + struct ploadinfo *pl = buf;
- +
- + if (!p->fname[0]) return EFILNF;
- + strncpy (pl->cmdlin, p->cmdlin, 128);
- + if (strlen (p->fname) <= pl->fnamelen)
- + strcpy (pl->fname, p->fname);
- + else
- + return ENAMETOOLONG;
- + }
- return 0;
- +
- case FIONREAD:
- case FIONWRITE:
- *((long *)buf) = 1L; /* we're always ready for i/o */
- *** 1.7 1993/06/25 21:14:36
- --- signal.c 1993/08/10 20:50:50
- ***************
- *** 86,91 ****
- --- 86,93 ----
- /* otherwise, make sure the process is awake */
- if (p->wait_q && p->wait_q != READY_Q) {
- short sr = spl7();
- + if (p->wait_q == SELECT_Q)
- + p->wait_cond = 0;
- rm_q(p->wait_q, p);
- add_q(READY_Q, p);
- spl(sr);
- *** 1.7 1993/06/25 21:14:36
- --- trutil.c 1993/08/10 20:51:22
- ***************
- *** 6,11 ****
- --- 6,12 ----
- #define CMDSYM '%'
-
- FILE *infile, *outfile;
- + extern YYSTYPE yylval;
-
- #define MAXNEST 10
- int hidecnt = 0;
- *** 1.7 1993/06/25 21:14:36
- --- unifs.c 1993/08/10 20:51:36
- ***************
- *** 1,6 ****
- /*
- Copyright 1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 32,37 ****
- --- 32,38 ----
- static DEVDRV * ARGS_ON_STACK uni_getdev P_((fcookie *fc, long *devsp));
- static long ARGS_ON_STACK uni_symlink P_((fcookie *dir, const char *name, const char *to));
- static long ARGS_ON_STACK uni_readlink P_((fcookie *fc, char *buf, int buflen));
- + static long ARGS_ON_STACK uni_fscntl P_((fcookie *dir, const char *name, int cmd, long arg));
-
- FILESYS uni_filesys = {
- (FILESYS *)0,
- ***************
- *** 42,48 ****
- nomkdir, uni_rmdir, uni_remove, uni_getname, uni_rename,
- uni_opendir, uni_readdir, uni_rewinddir, uni_closedir,
- uni_pathconf, uni_dfree, nowritelabel, noreadlabel,
- ! uni_symlink, uni_readlink, nohardlink, nofscntl, nodskchng
- };
-
- /*
- --- 43,49 ----
- nomkdir, uni_rmdir, uni_remove, uni_getname, uni_rename,
- uni_opendir, uni_readdir, uni_rewinddir, uni_closedir,
- uni_pathconf, uni_dfree, nowritelabel, noreadlabel,
- ! uni_symlink, uni_readlink, nohardlink, uni_fscntl, nodskchng
- };
-
- /*
- ***************
- *** 614,617 ****
- --- 615,777 ----
- if (strlen(u->data) >= buflen)
- return ENAMETOOLONG;
- return 0;
- + }
- +
- +
- +
- +
- + /* uk: use these Dcntl's to install a new filesystem which is only visible
- + * on drive u:
- + *
- + * FS_INSTALL: let the kernel know about the file system; it does NOT
- + * get a device number.
- + * FS_MOUNT: use Dcntl(FS_MOUNT, "u:\\foo", &descr) to make a directory
- + * foo where the filesytem resides in; the file system now
- + * gets its device number which is also written into the
- + * dev_no field of the fs_descr structure.
- + * FS_UNMOUNT: remove a file system's directory; this call closes all
- + * open files, directory searches and directories on this
- + * device. Make sure that the FS will not recognise any
- + * accesses to this device, as fs->root will be called
- + * during the reinitalisation!
- + * FS_UNINSTALL: remove a file system completely from the kernel list,
- + * but that will only be possible if there is no directory
- + * associated with this file system.
- + * This function allows it to write file systems as demons
- + * which stay in memory only as long as needed.
- + *
- + * BUG: it is not possible yet to lock such a filesystem.
- + */
- +
- + /* here we start with gemdos only file system device numbers */
- + static curr_dev_no = 0x100;
- +
- +
- +
- + static long ARGS_ON_STACK
- + uni_fscntl(dir, name, cmd, arg)
- + fcookie *dir;
- + const char *name;
- + int cmd;
- + long arg;
- + {
- + fcookie fc;
- + long r;
- +
- + extern struct kerinfo kernelinfo;
- + extern FILESYS *active_fs;
- +
- + if (cmd == FS_INSTALL) { /* install a new filesystem */
- + struct fs_descr *d = (struct fs_descr*)arg;
- + FILESYS *fs;
- +
- + /* check if FS is installed already */
- + for (fs = active_fs; fs; fs = fs->next)
- + if (d->file_system == fs) return 0L;
- + /* include new file system into chain of file systems */
- + d->file_system->next = active_fs;
- + active_fs = d->file_system;
- + return (long)&kernelinfo; /* return pointer to kernel info as OK */
- + } else if (cmd == FS_MOUNT) { /* install a new gemdos-only device for this FS */
- + struct fs_descr *d = (struct fs_descr*)arg;
- + FILESYS *fs;
- + UNIFILE *u;
- +
- + /* first check for existing names */
- + r = uni_lookup(dir, name, &fc);
- + if (r == 0) {
- + release_cookie(&fc);
- + return EACCDN; /* name exists already */
- + }
- + if (r != EFILNF) return r; /* some other error */
- + if (!d) return EACCDN;
- + if (!d->file_system) return EACCDN;
- + /* check if FS is installed */
- + for (fs = active_fs; fs; fs = fs->next)
- + if (d->file_system == fs) break;
- + if (!fs) return EACCDN; /* not installed, so return an error */
- + u = kmalloc(SIZEOF(UNIFILE));
- + if (!u) return EACCDN;
- + strncpy(u->name, name, NAME_MAX);
- + u->name[NAME_MAX] = 0;
- + u->mode = S_IFDIR|DEFAULT_DIRMODE;
- + u->data = 0;
- + u->fs = d->file_system;
- + /* now get the file system its own device number */
- + u->dev = d->dev_no = curr_dev_no++;
- + /* chain new entry into unifile list */
- + u->next = u_root;
- + u_root = u;
- + return (long)u->dev;
- + } else if (cmd == FS_UNMOUNT) { /* remove a file system's directory */
- + struct fs_descr *d = (struct fs_descr*)arg;
- + FILESYS *fs;
- + UNIFILE *u;
- +
- + /* first check that directory exists */
- + r = uni_lookup(dir, name, &fc);
- + if (r != 0) return EFILNF; /* name does not exist */
- + if (!d) return EFILNF;
- + if (!d->file_system) return EFILNF;
- + if (d->file_system != fc.fs)
- + return EFILNF; /* not the right name! */
- + u = (UNIFILE*)fc.index;
- + release_cookie(&fc);
- + if (!u || (u->fs != d->file_system))
- + return EFILNF;
- + /* check if FS is installed */
- + for (fs = active_fs; fs; fs = fs->next)
- + if (d->file_system == fs) break;
- + if (!fs) return EACCDN; /* not installed, so return an error */
- +
- + /* here comes the difficult part: we have to close all files on that
- + * device, so we have to call changedrv(). The file system driver
- + * has to make sure that further calls to fs.root() with this device
- + * number will fail!
- + *
- + * Kludge: mark the directory as a link, so uni_remove will remove it.
- + */
- + changedrv(u->dev);
- + u->mode &= ~S_IFMT;
- + u->mode |= S_IFLNK;
- + return uni_remove(dir, name);
- + } else if (cmd == FS_UNINSTALL) { /* remove file system from kernel list */
- + struct fs_descr *d = (struct fs_descr*)arg;
- + FILESYS *fs, *last_fs;
- + UNIFILE *u;
- +
- + /* first check if there are any files or directories associated with
- + * this file system
- + */
- + for (u = u_root; u; u = u->next)
- + if (u->fs == d->file_system)
- + return EACCDN; /* we cannot remove it before unmount */
- + last_fs = 0;
- + fs = active_fs;
- + while (fs) { /* go through the list and remove the file system */
- + if (fs == d->file_system) {
- + if (last_fs)
- + last_fs->next = fs->next;
- + else
- + active_fs = fs->next;
- + d->file_system->next = 0;
- + return 0;
- + }
- + last_fs = fs;
- + fs = fs->next;
- + }
- + return EFILNF;
- + } else {
- + /* see if we should just pass this along to another file system */
- + r = uni_lookup(dir, name, &fc);
- + if (r == 0) {
- + if (fc.fs != &uni_filesys) {
- + r = (*fc.fs->fscntl)(&fc, ".", cmd, arg);
- + release_cookie(&fc);
- + return r;
- + }
- + release_cookie(&fc);
- + }
- + }
- + return EINVFN;
- }
- *** 1.7 1993/06/25 21:14:36
- --- util.c 1993/08/13 19:00:52
- ***************
- *** 1,6 ****
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 107,113 ****
- * kernel memory allocation routines
- */
-
- ! #define KERMEM_THRESHOLD QUANTUM-8
- #define KMAGIC ((MEMREGION *)0x87654321L)
- #define NKMAGIC 0x19870425L
-
- --- 107,118 ----
- * kernel memory allocation routines
- */
-
- ! #define KERMEM_THRESHOLD (QUANTUM-8)
- ! #if 0
- ! #define KERMEM_SIZE QUANTUM
- ! #else
- ! #define KERMEM_SIZE ((KERMEM_THRESHOLD+8)*2)
- ! #endif
- #define KMAGIC ((MEMREGION *)0x87654321L)
- #define NKMAGIC 0x19870425L
-
- ***************
- *** 115,121 ****
- kmalloc(size)
- long size;
- {
- ! MEMREGION *m = 0;
- MEMREGION **p;
- long *lp;
-
- --- 120,126 ----
- kmalloc(size)
- long size;
- {
- ! MEMREGION *m;
- MEMREGION **p;
- long *lp;
-
- ***************
- *** 142,155 ****
- DEBUG(("kmalloc(%lx): nalloc is out of memory",size));
-
- /* If this is commented out, then we fall through to try_getregion */
- ! if (0 == (m = get_region(alt, QUANTUM, PROT_S))) {
- ! if (0 == (m = get_region(core, QUANTUM, PROT_S))) {
- DEBUG(("No memory for another arena"));
- goto try_getregion;
- }
- }
- ! nalloc_arena_add((void *)m->loc,QUANTUM);
- ! m = 0;
- goto tryagain;
- }
- }
- --- 147,162 ----
- DEBUG(("kmalloc(%lx): nalloc is out of memory",size));
-
- /* If this is commented out, then we fall through to try_getregion */
- ! if (0 == (m = get_region(alt, KERMEM_SIZE, PROT_S))) {
- ! if (0 == (m = get_region(core, KERMEM_SIZE, PROT_S))) {
- DEBUG(("No memory for another arena"));
- goto try_getregion;
- }
- }
- ! lp = (long *)m->loc;
- ! *lp++ = (long)KMAGIC;
- ! *lp++ = (long)m;
- ! nalloc_arena_add((void *)lp,KERMEM_SIZE);
- goto tryagain;
- }
- }
- *** 1.7 1993/06/25 21:14:36
- --- xbios.c 1993/08/12 21:38:22
- ***************
- *** 29,35 ****
- * unexpectedly. So we play some dirty tricks here: the function
- * call is treated like a signal handler, and we take advantage
- * of the fact that no context switches will take place while
- ! * in supervisor mode. ASSUMPTION: the user will not choose to
- * switch back to user mode, or if s/he does it will be as part
- * of a longjmp().
- *
- --- 29,35 ----
- * unexpectedly. So we play some dirty tricks here: the function
- * call is treated like a signal handler, and we take advantage
- * of the fact that no context switches will take place while
- ! * in supervisor mode. ASSTMPTION: the user will not choose to
- * switch back to user mode, or if s/he does it will be as part
- * of a longjmp().
- *
- ***************
- *** 260,276 ****
- }
-
-
- ! long
- dosound(ptr)
- ! char *ptr;
- {
- - char c;
- MEMREGION *r;
-
- ! if (!no_mem_prot) {
- /* check that this process has access to the memory */
- /* (if not, the next line will cause a bus error) */
- ! c = *((volatile char *)ptr);
-
- /* OK, now make sure that interrupt routines will have access,
- * too
- --- 260,275 ----
- }
-
-
- ! long ARGS_ON_STACK
- dosound(ptr)
- ! const char *ptr;
- {
- MEMREGION *r;
-
- ! if (!no_mem_prot && ((long)ptr >= 0)) {
- /* check that this process has access to the memory */
- /* (if not, the next line will cause a bus error) */
- ! (void)(*((volatile char *)ptr));
-
- /* OK, now make sure that interrupt routines will have access,
- * too
- ***************
- *** 282,289 ****
- }
- }
-
- ! Dosound(ptr);
- ! return 0;
- }
-
- void
- --- 281,287 ----
- }
- }
-
- ! return call_dosound(ptr);
- }
-
- void
- *** 1.7 1993/06/25 21:14:36
- --- asmtab.h 1993/08/10 20:46:58
- ***************
- *** 1,16 ****
- ! #ifndef YYSTYPE
- ! #define YYSTYPE int
- ! #endif
- ! #define WORD 258
- ! #define WHITESP 259
- ! #define EOLN 260
- ! #define STRING 261
- ! #define DEFINECMD 262
- ! #define INCLUDECMD 263
- ! #define IFDEFCMD 264
- ! #define IFNDEFCMD 265
- ! #define ELSECMD 266
- ! #define ENDIFCMD 267
- !
- !
- ! extern YYSTYPE yylval;
- --- 1,10 ----
- ! #define WORD 257
- ! #define WHITESP 258
- ! #define EOLN 259
- ! #define STRING 260
- ! #define DEFINECMD 261
- ! #define INCLUDECMD 262
- ! #define IFDEFCMD 263
- ! #define IFNDEFCMD 264
- ! #define ELSECMD 265
- ! #define ENDIFCMD 266
- *** 1.7 1993/06/25 21:14:36
- --- file.h 1993/08/10 20:48:46
- ***************
- *** 390,396 ****
- --- 390,405 ----
- #define PTRACEFLOW (('P'<< 8) | 9)
- #define PTRACESTEP (('P'<< 8) | 10)
- #define PTRACE11 (('P'<< 8) | 11)
- + #define PLOADINFO (('P'<< 8) | 12)
-
- + struct ploadinfo {
- + /* passed */
- + short fnamelen;
- + /* returned */
- + char *cmdlin, *fname;
- + };
- +
- +
- #define SHMGETBLK (('M'<< 8) | 0)
- #define SHMSETBLK (('M'<< 8) | 1)
-
- ***************
- *** 501,506 ****
- --- 510,530 ----
- short flags;
- struct tty *tty;
- long reserved[4];
- + };
- +
- +
- + #define FS_INSTALL 0xf001 /* let the kernel know about the file system */
- + #define FS_MOUNT 0xf002 /* make a new directory for a file system */
- + #define FS_UNMOUNT 0xf003 /* remove a directory for a file system */
- + #define FS_UNINSTALL 0xf004 /* remove a file system from the list */
- +
- +
- + struct fs_descr
- + {
- + FILESYS *file_system;
- + short dev_no; /* this is filled in by MiNT if arg == FS_MOUNT*/
- + long flags;
- + long reserved[4];
- };
-
-
- *** 1.7 1993/06/25 21:14:36
- --- proc.h 1993/08/10 20:50:12
- ***************
- *** 141,146 ****
- --- 141,150 ----
- * programs should *not* try to read this stuff via the U:\PROC dir.
- */
-
- + /* jr: two fields to hold information passed to Pexec */
- + char fname[PATH_MAX]; /* name of binary */
- + char cmdlin[128]; /* original command line */
- +
- char name[PNAMSIZ+1]; /* process name */
- TIMEOUT *alarmtim; /* alarm() event */
- short slices; /* number of time slices before this
- *** 1.7 1993/06/25 21:14:36
- --- proto.h 1993/08/13 17:27:22
- ***************
- *** 30,35 ****
- --- 30,36 ----
- long ARGS_ON_STACK rsconf P_((int, int, int, int, int, int));
- long ARGS_ON_STACK bconmap P_((int));
- long ARGS_ON_STACK cursconf P_((int, int));
- + long ARGS_ON_STACK dosound P_((const char *ptr));
- void init_xbios P_((void));
-
- /* console.c */
- ***************
- *** 169,174 ****
- --- 170,176 ----
- void init_drive P_((int drv));
- void init_filesys P_((void));
- void load_filesys P_((void));
- + void load_devdriver P_((void));
- void close_filesys P_((void));
- void ARGS_ON_STACK changedrv P_((unsigned drv));
- int disk_changed P_((int drv));
- ***************
- *** 216,222 ****
- long max_rsize P_((MMAP map));
- long tot_rsize P_((MMAP map, int flag));
- virtaddr alloc_region P_((MMAP map, ulong size, int mode));
- ! MEMREGION *create_env P_((const char *env));
- MEMREGION *create_base P_((const char *cmd, MEMREGION *env, ulong flags, ulong prgsize));
- MEMREGION *load_region P_((const char *name, MEMREGION *env, const char *cmdlin, XATTR *x,
- MEMREGION **text, long *fp));
- --- 218,224 ----
- long max_rsize P_((MMAP map));
- long tot_rsize P_((MMAP map, int flag));
- virtaddr alloc_region P_((MMAP map, ulong size, int mode));
- ! MEMREGION *create_env P_((const char *env, ulong flags));
- MEMREGION *create_base P_((const char *cmd, MEMREGION *env, ulong flags, ulong prgsize));
- MEMREGION *load_region P_((const char *name, MEMREGION *env, const char *cmdlin, XATTR *x,
- MEMREGION **text, long *fp));
- *** 1.7 1993/06/25 21:14:36
- --- sproto.h 1993/08/12 21:41:30
- ***************
- *** 33,38 ****
- --- 33,39 ----
- /* syscall.s */
- char * ARGS_ON_STACK lineA0 P_((void));
- void ARGS_ON_STACK call_aes P_((short **));
- + long ARGS_ON_STACK call_dosound P_((const void *));
- long ARGS_ON_STACK callout P_((long, ...));
- long ARGS_ON_STACK callout1 P_((long, int));
- long ARGS_ON_STACK callout2 P_((long, int, int));
- *** 1.7 1993/06/25 21:14:36
- --- version.h 1993/08/12 21:20:36
- ***************
- *** 1,5 ****
- #define MAJ_VERSION 1
- ! #define MIN_VERSION 7
-
- #ifndef MULTITOS
- #define BETA
- --- 1,5 ----
- #define MAJ_VERSION 1
- ! #define MIN_VERSION 9
-
- #ifndef MULTITOS
- #define BETA
- *** 1.7 1993/06/25 21:14:36
- --- asm.y 1993/08/10 20:46:46
- ***************
- *** 1,4 ****
- - /* Infix notation calculator--calc */
-
- %{
- #define YYSTYPE char *
- --- 1,3 ----
- ***************
- *** 173,181 ****
- do_define("dc.w", ".word");
- do_define("dc.b", ".byte");
- } else if (syntax == ASM) {
- ! do_define("TEXT", "SECTION TEXT");
- ! do_define("DATA", "SECTION DATA");
- ! do_define("BSS", "SECTION BSS");
- }
- }
-
- --- 172,180 ----
- do_define("dc.w", ".word");
- do_define("dc.b", ".byte");
- } else if (syntax == ASM) {
- ! do_define("TEXT", "SECTION TEXT,CODE");
- ! do_define("DATA", "SECTION DATA,DATA");
- ! do_define("BSS", "SECTION BSS,BSS");
- }
- }
-
-